# jwt token
# openssl rand -hex 32 生成密钥
SECRET_KEY = 'c1f3f7ad6e25b8c5debeaff2b5bcc696c60bb0686fdfdfb026a7fd1999f5aae4'
ALGORITHM = 'HS256'
# jwt令牌过期时间设置
ACCESS_TOKEN_EXPIRE_MINUTES = 60*24*7


# 数据库配置
# sqlite
SQLITE_DB_URL = 'sqlite:///./test.db'


# 打包前配置ECS上MySQL配置
PRODUCT_MYSQL_USER = 'root'
PRODUCT_MYSQL_PASSWORD = 'Lyh1999%400602sS%21'  # 连接数据库时特殊符号需要转义  原密码Lyh1999@0602sS!
PRODUCT_MYSQL_HOST = 'mysql'  # 使用数据库host地址
PRODUCT_MYSQL_PORT = '3306'
PRODUCT_MYSQL_DATABASE = 'mydatabase'

# 本地测试配置
LOCAL_TEST_MYSQL_PASSWORD = 'password'
LOCAL_TEST_MYSQL_DATABASE = 'yjtm'
# mysql本地测试环境配置
# MYSQL_URL = "mysql+pymysql://root:{LOCAL_TEST_MYSQL_PASSWORD}@localhost:3306/{LOCAL_TEST_MYSQL_DATABASE}"

# mysql线上正式环境配置
MYSQL_URL = f"mysql+pymysql://{PRODUCT_MYSQL_USER}:{PRODUCT_MYSQL_PASSWORD}@{PRODUCT_MYSQL_HOST}:{PRODUCT_MYSQL_PORT}/{PRODUCT_MYSQL_DATABASE}"
